Search Matching

Поиск
Список
Период
Сортировка
От lynch@lscorp.com (Richard Lynch)
Тема Search Matching
Дата
Msg-id v02140b44b1737f06e6d5@[207.152.64.133]
обсуждение исходный текст
Список pgsql-sql
Is there some easy way to:

1.  Match multiple fields with the same key

select * from table where * ~* 'key';

2.  Get a count of the number of matches:

EG:

table:
First     | Last
--------------------
John      | Doe
Jane      | Doe
John      | Johnson

I need a query that given 'John' and 'Doe' would return something like:

Score  | First   | Last
-----------------------
2      | John    | Doe
2      | John    | Johnson
1      | Jane    | Doe

I guess I want a search engine just like the big boys, but I don't want to
get too carried away with coding it up in PHP if there's some SQL that will
do it faster/better.  :-)

--
--
-- "TANSTAAFL" Rich lynch@lscorp.com



В списке pgsql-sql по дате отправления:

Предыдущее
От: Mario Filipe
Дата:
Сообщение: ...
Следующее
От: "Roland B. Roberts"
Дата:
Сообщение: subscribe